import {RouteDef} from "../model/RouteDef.ts";

export interface RouteDetProp {

    routeDef : RouteDef

}

export interface ModeProp {

    mode? : 'create' | 'modify' | 'display' | 'none'

}

export interface OrderConfig {

    order : number

    config : string

}


export interface Kv {

    key : string

    value : string

}

export const EMPTY_KV : Kv = { key : '' , value : '' } as const


export function EmptyIfNull<T>( fun : T ) : T {
    if ( fun ) {
        return fun!
    }
    return (()=>{}) as T
}
